import { get, post } from '../http';

/**
 *基础资料
 *   dysuff： 染化料检验项目定义 
 *   affirmColorClass 确定色类定义
 *   colorSouce 对色光源定义 
 *   colorSystem 色系定义
 *   trialDupSample 试复样工艺定义
 *   dupSchedule 复样进度
 *   dupType 复样类型
 *   proofGroup 打样组
 *   colorDepth 颜色深浅
 *    
 */
export function dysuff() {
    return {
        /** 
         * 获取： 染化料检验项目 条件查询
         * @param params 
         * @returns 
         */
        getDysuffList: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/select',
                data: params
            })
        },
        /**
         *  染化料检验项目 分页查询 
         */
        getPageQueryDysuffList: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/selectPage',
                data: params
            })
        },
        /**
         * 染化料检验项目  新增 操作
         * @param params 
         * @returns 
         */
        addDysuff: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/insert',
                data: params
            })
        },
        //修改
        editDysuff: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/update',
                data: params
            });
        },
        //删除
        batchDelDysuff: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/delete',
                data: params
            })
        },

        //下拉查询
        getFileDysuffList: (params: any) => {
            return post({
                url: '/pdm/softenCheckout/getFieldValue',
                data: params
            })
        },

    }
}

export function affirmColorClass() {
    return {
        /**
         * 获取列表 条件查询
         */
        getColorClassList: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/select',
                data: params
            })
        },
        /**
         * 分页查询
         */
        getPageColorClassList: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/selectPage',
                data: params
            })
        },
        /**
         * 新增
         */
        addColorClass: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/insert',
                data: params
            })
        },

        /**
         * 更新 
         */
        editColorClass: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/update',
                data: params
            })
        },

        /**
         * 删除
         */
        delColorClass: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/delete',
                data: params
            })
        },

        /**
         * 下拉查询
         */
        getFieldColorClassList: (params: any) => {
            return post({
                url: '/pdm/affirmColorClass/getFieldValue',
                data: params
            })
        }

    }
}

export function colorSouce() {
    return {
        //获取列表
        getColorSouceList: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/select',
                data: params
            })
        },

        // 分页查询
        getPageColorSouce: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/selectPage',
                data: params
            });
        },

        //新增
        addColorSouce: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/insert',
                data: params
            })
        },

        //编辑
        editColorSouce: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/update',
                data: params
            })
        },
        //批量删除
        batchDelColorSouce: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/delete',
                data: params
            })
        },


        /**
         * 下拉查询
         */
        getFieldColorSouceList: (params: any) => {
            return post({
                url: '/pdm/coloringMatch/getFieldValue',
                data: params
            })
        }
    }
}

export function colorSystem() {
    return {
        //获取列表
        getColorSystemList: (params: any) => {
            return post({
                url: '/pdm/colourScheme/select',
                data: params
            })
        },
        //分页获取
        getPageColorSystemList: (params: any) => {
            return post({
                url: '/pdm/colourScheme/selectPage',
                data: params
            })
        },
        //新增 
        addColorSystem: (params: any) => {
            return post({
                url: '/pdm/colourScheme/insert',
                data: params
            })
        },
        //修改
        editColorSystem: (params: any) => {
            return post({
                url: '/pdm/colourScheme/update',
                data: params
            })
        },
        //批量删除
        batchColorSystem: (params: any) => {
            return post({
                url: '/pdm/colourScheme/delete',
                data: params
            })
        },
        /**
        * 下拉查询
        */
        getFieldColorSystemList: (params: any) => {
            return post({
                url: '/pdm/colourScheme/getFieldValue',
                data: params
            })
        }
    }
}

export function trialDupSample() {
    return {
        //获取列表
        getTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/select',
                data: params
            })
        },
        //分页获取
        getPageTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/selectPage',
                data: params
            })
        },
        //新增 
        addTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/insert',
                data: params
            })
        },
        //修改
        editTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/update',
                data: params
            })
        },
        //批量删除
        batchTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/delete',
                data: params
            })
        },
        /**
       * 下拉查询
       */
        getFieldTrialDupSample: (params: any) => {
            return post({
                url: '/pdm/duplicateSample/getFieldValue',
                data: params
            })
        }
    }
}

export function dupSchedule() {
    return {
        //获取列表
        getDupSchedList: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/select',
                data: params
            })
        },
        //条件分页查询
        getPageDupSchedList: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/selectPage',
                data: params
            })
        },
        //新增
        addDupSched: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/insert',
                data: params
            })
        },
        //编辑
        editDupSched: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/update',
                data: params
            })
        },
        //删除
        delDupSched: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/delete',
                data: params
            })
        },
        //下拉查询
        getFieldDupSchedList: (params: any) => {
            return post({
                url: '/pdm/duplicateSchedule/getFieldValue',
                data: params
            })
        }
    }
}

export function dupType() {
    return {
        //获取列表
        getDupTypeList: (params: any) => {
            return post({
                url: '/pdm/duplicateType/select',
                data: params
            })
        },
        //条件分页查询
        getPageDupTypeList: (params: any) => {
            return post({
                url: '/pdm/duplicateType/selectPage',
                data: params
            })
        },
        //新增
        addDupType: (params: any) => {
            return post({
                url: '/pdm/duplicateType/insert',
                data: params
            })
        },
        //编辑
        editDupType: (params: any) => {
            return post({
                url: '/pdm/duplicateType/update',
                data: params
            })
        },
        //删除
        delDupType: (params: any) => {
            return post({
                url: '/pdm/duplicateType/delete',
                data: params
            })
        },
        //下拉查询
        getFieldDupTypeList: (params: any) => {
            return post({
                url: '/pdm/duplicateType/getFieldValue',
                data: params
            })
        }
    }
}

export function proofGroup() {
    return {
        //获取列表
        getProofGroupList: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/select',
                data: params
            })
        },
        //条件分页查询
        getPageProofGroupList: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/selectPage',
                data: params
            })
        },
        //新增
        addProofGroup: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/insert',
                data: params
            })
        },
        //编辑
        editProofGroup: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/update',
                data: params
            })
        },
        //删除
        delProofGroup: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/delete',
                data: params
            })
        },
        //下拉查询
        getFieldProofGroupList: (params: any) => {
            return post({
                url: '/pdm/proofingGroupDefinition/getFieldValue',
                data: params
            })
        }
    }
}

export function colorDepth() {
    return {
        //获取列表
        getColorDepthList: (params: any) => {
            return post({
                url: '/pdm/shade/select',
                data: params
            })
        },
        //条件分页查询
        getPageColorDepthList: (params: any) => {
            return post({
                url: '/pdm/shade/selectPage',
                data: params
            })
        },
        //新增
        addColorDepth: (params: any) => {
            return post({
                url: '/pdm/shade/insert',
                data: params
            })
        },
        //编辑
        editColorDepth: (params: any) => {
            return post({
                url: '/pdm/shade/update',
                data: params
            })
        },
        //删除
        delColorDepth: (params: any) => {
            return post({
                url: '/pdm/shade/delete',
                data: params
            })
        },
        //下拉查询
        getFieldColorDepthList: (params: any) => {
            return post({
                url: '/pdm/shade/getFieldValue',
                data: params
            })
        }
    }
}


/**
 *  打样管理
 */
export function proofMgt() {
    return {
        /**
         * 新增 编辑 
         * @param params 
         * @returns 
         */
        operProofMgt: (params: any) => {
            return post({
                url: '/pdm/proofingManage/insert',
                data: params
            })
        },

        /**
         * 根据主表id 查询子列表
         * @param params 
         * @returns 
         */
        getByidQueryProofMgtList: (params: any) => {
            return post({
                url: '/pdm/proofingManage/selectList',
                data: params
            })
        },

        /**
         * 条件查询列表 分页查询列表
         */
        getProofMgtList: (params: any) => {
            return post({
                url: '/pdm/proofingManage/select',
                data: params
            })
        },

        /**
        * 批量删除列表
        */
        batchDelProof: (params: any) => {
            return post({
                url: "/pdm/proofingManage/delete",
                data: params
            })
        },

        //获取打印数据
        getPrintProof: (params: any) => {
            return post({
                url: '/pdm/proofingManage/getCloth',
                data: params,
            })
        }
    }

}


/**
 * 试复样管理
 */
export function dupSmapleReg() {
    return {
        /**
         * 条件查询
         */
        getQueryDupSmapleRegList: (params: any) => {
            return post({
                url: "/pdm/duplicateSampleRegister/select",
                data: params
            })
        },
        /**
        * 分页查询
        */
        gePageDupSmapleRegList: (params: any) => {
            return post({
                url: "/pdm/duplicateSampleRegister/selectPage",
                data: params
            })
        },
        /**
        * 新增
        */
        addDupSmapleReg: (params: any) => {
            return post({
                url: "/pdm/duplicateSampleRegister/insert",
                data: params
            })
        },
        /**
        * 编辑
        */
        editDupSmapleReg: (params: any) => {
            return post({
                url: "/pdm/duplicateSampleRegister/update",
                data: params
            })
        },
        /**
        * 批量删除
        */
        bathDelDupSmapleRegList: (params: any) => {
            return post({
                url: "/pdm/duplicateSampleRegister/delete",
                data: params
            })
        },
        //获取打印数据
        getPrintDupSmaple: (params: any) => {
            return post({
                url: '/pdm/duplicateSampleRegister/getCloth',
                data: params,
            })
        }
    }

}
/**
 * 每日打板
 */
export function StrikeBord() {
    return {
        //获取打板列表
        getBordSelectList: (params: any) => {
            return post({
                url: '/pdm/duplicateSampleRegister/selectDbtj',
                data: params
            })
        }
    }
}

/**
 *  试复样明细列表
 */
export function dupDetail() {
    return {
        //分页获取
        getPageDupDetailList(params: any) {
            return post({
                url: '/pdm/DuplicateDetail/getPage',
                data: params
            })
        },
        //新增
        addDupDetail(params: any) {
            return post({
                url: '/pdm/DuplicateDetail/insert',
                data: params
            })
        },
        //修改
        editDupDetail(params: any) {
            return post({
                url: '/pdm/DuplicateDetail/update',
                data: params
            })
        },
        //删除 
        bathDelDupDetail(params: any) {
            return post({
                url: '/api/pdm/DuplicateDetail/delete',
                data: params
            })
        },
        //模糊下拉查询
        getFieldDupDetailList(params: any) {
            return post({
                url: '/pdm/DuplicateDetail/getFieldValue',
                data: params
            })
        }

    }
}


/**
*  试复样汇总列表
*/

export function dupSummary() {
    return {
        //分页获取
        getPageDupSummaryList(params: any) {
            return post({
                url: '/pdm/summarizing/getPage',
                data: params
            })
        },
        //新增
        addDupSummary(params: any) {
            return post({
                url: '/pdm/summarizing/insert',
                data: params
            })
        },
        //修改
        editDupSummary(params: any) {
            return post({
                url: '/pdm/summarizing/update',
                data: params
            })
        },
        //删除 
        bathDelDupSummary(params: any) {
            return post({
                url: '/api/pdm/summarizing/delete',
                data: params
            })
        },
        //模糊下拉查询
        getFieldDupSummaryList(params: any) {
            return post({
                url: '/pdm/summarizing/getFieldValue',
                data: params
            })
        }
    }
}

/**
 * 根据布号查询
 */

export function devFabricInfo(){
    return {
        getDevFabricInfo(params:any){
            return post({
                url: '/pdm/DevFabricInfo/getList',
                data: params
            })
        }
    } 
}

/**
*  试复样回修
*/
export function dupReWork() {
    return {
        //分页获取
        getPageDupReWorkList(params: any) {
            return post({
                url: '/pdm/ReturnRepair/getPage',
                data: params
            })
        },
        //新增
        addDupReWork(params: any) {
            return post({
                url: '/pdm/ReturnRepair/insert',
                data: params
            })
        },
        //修改
        editDupReWork(params: any) {
            return post({
                url: '/pdm/ReturnRepair/update',
                data: params
            })
        },
        //删除 
        bathDelDupReWork(params: any) {
            return post({
                url: '/api/pdm/ReturnRepair/delete',
                data: params
            })
        },
        //模糊下拉查询
        getFieldDupReWorkList(params: any) {
            return post({
                url: '/pdm/ReturnRepair/getFieldValue',
                data: params
            })
        }
    }
}

/**
 * 
 * 来料检验 
 */
export function incoming() {
    return {
        /**
         * 获取来料检验列表 条件查询
         * @param params 
         * @returns 
         */
        getIncomingList: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/select',
                data: params
            })
        },
        /**
         * 根据主表 Id 查询子列表 
         * @param params 
         * @returns 
         */
        getByIdSelectIncomingList: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/selectList',
                data: params
            })
        },

        /**
         * 来料检验  新增 、 编辑 操作
         * @param params 
         * @returns 
         */
        operIncoming: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/insert',
                data: params
            })
        },

        /**
         *  来料检验列表 分页查询 
         */
        getPageQueryIncomList: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/selectPage',
                data: params
            })
        },

        /**
         * 批量删除 
         * @param params 
         */
        batchDelIncoming: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/delete',
                data: params
            })
        },

        //下拉查询
        getFieldIncomingList: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/getFieldValue',
                data: params
            })
        },

        //获取打印数据
        getPrintFieldIncoming: (params: any) => {
            return post({
                url: '/pdm/incomingCheckout/getCloth',
                data: params,
            })
        }
    }
}
